From bd9dfffdcb72739db811140c3056d409c1a955d9 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Mon, 20 Jul 2009 10:09:00 +0100 Subject: [PATCH] xend: modify sort() for Python 2.3 Python 2.3 does not support the sort(cmp, key, reverse) style. Signed-off-by: KUWAMURA Shin'ya Acked-by: Ian Jackson --- tools/python/xen/util/pci.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/python/xen/util/pci.py b/tools/python/xen/util/pci.py index e651d5c544..de5e619f41 100644 --- a/tools/python/xen/util/pci.py +++ b/tools/python/xen/util/pci.py @@ -310,7 +310,7 @@ def parse_pci_name_extended(pci_dev_str): # By arranging things so that virtual function 0 is first, # attachemnt can use the returned list as is. And detachment # can just reverse the list. - pci.sort(None, lambda x: int(x['vdevfn'], 16), 1) + pci.sort(lambda x,y: cmp(int(y['vdevfn'], 16), int(x['vdevfn'], 16))) return pci def parse_pci_name(pci_name_string): -- 2.30.2